/*
Minims .Net Playstation 3 UPNP ContentDirectory
Copyright (C) 2008  Guillaume Plourde

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; version 2
of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Xml;

namespace minims_lib
{
	public class X_MS_MediaReceiverRegistrar : Service
	{
		public X_MS_MediaReceiverRegistrar(ConfigManager configmanager)
			: base("X_MS_MediaReceiverRegistrar")
		{

		}

		#region Service Description XML, use GetDescription()
		static public string GetDescription()
		{
			// Edit this xml to match device capabilities
			StringBuilder desc = new StringBuilder();

			desc.Append("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
			desc.Append("<scpd xmlns=\"urn:schemas-upnp-org:service-1-0\">");
			desc.Append("<specVersion><major>1</major><minor>0</minor></specVersion>");
			desc.Append("<actionList>");
			desc.Append("<action><name>IsAuthorized</name><argumentList><argument><name>DeviceID</name><direction>in</direction><relatedStateVariable>A_ARG_TYPE_DeviceID</relatedStateVariable></argument><argument><name>Result</name><direction>out</direction><relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable></argument></argumentList></action>");
			desc.Append("<action><name>RegisterDevice</name><argumentList><argument><name>RegistrationReqMsg</name><direction>in</direction><relatedStateVariable>A_ARG_TYPE_RegistrationReqMsg</relatedStateVariable></argument><argument><name>RegistrationRespMsg</name><direction>out</direction><relatedStateVariable>A_ARG_TYPE_RegistrationRespMsg</relatedStateVariable></argument></argumentList></action>");
			desc.Append("<action><name>IsValidated</name><argumentList><argument><name>DeviceID</name><direction>in</direction><relatedStateVariable>A_ARG_TYPE_DeviceID</relatedStateVariable></argument><argument><name>Result</name><direction>out</direction><relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable></argument></argumentList></action>");
			desc.Append("</actionList>");
			desc.Append("<serviceStateTable>");
			desc.Append("<stateVariable sendEvents=\"no\"><name>A_ARG_TYPE_DeviceID</name><dataType>string</dataType></stateVariable>");
			desc.Append("<stateVariable sendEvents=\"no\"><name>A_ARG_TYPE_Result</name><dataType>int</dataType></stateVariable>");
			desc.Append("<stateVariable sendEvents=\"no\"><name>A_ARG_TYPE_RegistrationReqMsg</name><dataType>bin.base64</dataType></stateVariable>");
			desc.Append("<stateVariable sendEvents=\"no\"><name>A_ARG_TYPE_RegistrationRespMsg</name><dataType>bin.base64</dataType></stateVariable>");
			desc.Append("<stateVariable sendEvents=\"yes\"><name>AuthorizationGrantedUpdateID</name><dataType>ui4</dataType></stateVariable>");
			desc.Append("<stateVariable sendEvents=\"yes\"><name>AuthorizationDeniedUpdateID</name><dataType>ui4</dataType></stateVariable>");
			desc.Append("<stateVariable sendEvents=\"yes\"><name>ValidationSucceededUpdateID</name><dataType>ui4</dataType></stateVariable>");
			desc.Append("<stateVariable sendEvents=\"yes\"><name>ValidationRevokedUpdateID</name><dataType>ui4</dataType></stateVariable>");
			desc.Append("</serviceStateTable></scpd>");
			return desc.ToString();
		}
		#endregion
	}
}
